import Vue from 'vue';

import 'normalize.css/normalize.css'; // A modern alternative to CSS resets

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import '@/styles/index.scss'; // global css
import '@/assets/icon/iconfont.js'

import App from './App';
import store from './store';
import router from './router';
import axios from 'axios';
import VueAxios from 'vue-axios';
import '@/icons'; // icon
import '@/permission' // permission control

import * as filters from './filters';
import Viewer from 'v-viewer';
import 'viewerjs/dist/viewer.css';

Vue.use(Viewer, {
  defaultOptions: {
    'inline': false,
    'button': true, //右上角按钮
    "navbar": true, //底部缩略图
    "title": false, //当前图片标题
    "toolbar": true, //底部工具栏
    "tooltip": true, //显示缩放百分比
    "movable": true, //是否可以移动
    "zoomable": true, //是否可以缩放
    "rotatable": true, //是否可旋转
    "scalable": false, //是否可翻转
    "transition": true, //使用 CSS3 过度
    "fullscreen": false, //播放时是否全屏
    "keyboard": true, //是否支持键盘
    "url": "data-source",
  }
})

import VueLazyLoad from 'vue-lazyload';

Vue.use(VueLazyLoad, {
  error: require('./assets/common_images/placeholder-pic.png'),//报错需要的图片
  loading: require('./assets/common_images/placeholder-pic.png')
});

Vue.use(ElementUI);
Vue.use(VueAxios, axios);
// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
});

Vue.config.productionTip = false;

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
});
